package cn.zl.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhanglang
 * @Date 2020/4/11
 */
@Configuration
public class ZlRule {

    @Bean
    public IRule myRule(){
        //默认式轮询，现在自定义ZlRandomRule
//        return new ZlRandomRule();
        return new RandomRule();
    }
}
